<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>社交网站全屏消息提示样式集合</title>
  <!-- Bootstrap 5 CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
  
  <style>
    :root {
      --primary: #4F46E5;
      --success: #10B981;
      --warning: #F59E0B;
      --danger: #EF4444;
      --info: #3B82F6;
      --dark: #1F2937;
      --light: #F9FAFB;
      --white: #FFFFFF;
      --gray: #6B7280;
      --light-gray: #E5E7EB;
      --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      background-color: #F3F4F6;
      color: var(--dark);
      min-height: 100vh;
      padding: 0;
      margin: 0;
    }
    
    .container {
      max-width: 400px;
      margin: 0 auto;
      background-color: var(--white);
      min-height: 100vh;
      position: relative;
      overflow: hidden;
    }
    
    /* 模拟内容区域 */
    .app-content {
      padding: 20px;
      min-height: 100vh;
    }
    
    .page-title {
      font-size: 24px;
      font-weight: 700;
      margin-bottom: 20px;
    }
    
    .btn {
      display: block;
      width: 100%;
      padding: 14px;
      border-radius: 12px;
      font-size: 16px;
      font-weight: 600;
      text-align: center;
      border: none;
      cursor: pointer;
      transition: all 0.3s ease;
      margin-bottom: 12px;
    }
    
    .btn-primary {
      background-color: var(--primary);
      color: white;
    }
    
    .btn-success {
      background-color: var(--success);
      color: white;
    }
    
    .btn-warning {
      background-color: var(--warning);
      color: white;
    }
    
    .btn-danger {
      background-color: var(--danger);
      color: white;
    }
    
    .btn-info {
      background-color: var(--info);
      color: white;
    }
    
    .btn-outline {
      background-color: transparent;
      color: var(--primary);
      border: 1px solid var(--primary);
    }
    
    .section {
      margin-bottom: 24px;
      background-color: var(--white);
      border-radius: 16px;
      padding: 20px;
      box-shadow: var(--shadow);
    }
    
    .section-title {
      font-size: 18px;
      font-weight: 600;
      margin-bottom: 16px;
    }
    
    /* 全屏消息提示样式 */
    .fullscreen-notification {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 1050;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
    }
    
    .fullscreen-notification.show {
      opacity: 1;
      visibility: visible;
    }
    
    .notification-backdrop {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: rgba(0, 0, 0, 0.7);
    }
    
    .notification-content {
      position: relative;
      width: 90%;
      max-width: 360px;
      background-color: var(--white);
      border-radius: 20px;
      padding: 30px 20px;
      text-align: center;
      transform: translateY(30px) scale(0.95);
      transition: all 0.3s ease;
    }
    
    .fullscreen-notification.show .notification-content {
      transform: translateY(0) scale(1);
    }
    
    /* 不同类型通知的样式 */
    .notification-success .notification-icon {
      background-color: rgba(16, 185, 129, 0.1);
      color: var(--success);
    }
    
    .notification-success .notification-confirm {
      background-color: var(--success);
    }
    
    .notification-warning .notification-icon {
      background-color: rgba(245, 158, 11, 0.1);
      color: var(--warning);
    }
    
    .notification-warning .notification-confirm {
      background-color: var(--warning);
    }
    
    .notification-error .notification-icon {
      background-color: rgba(239, 68, 68, 0.1);
      color: var(--danger);
    }
    
    .notification-error .notification-confirm {
      background-color: var(--danger);
    }
    
    .notification-info .notification-icon {
      background-color: rgba(59, 130, 246, 0.1);
      color: var(--info);
    }
    
    .notification-info .notification-confirm {
      background-color: var(--info);
    }
    
    .notification-invite .notification-icon {
      background: linear-gradient(135deg, #EC4899, #8B5CF6);
      color: white;
    }
    
    .notification-invite .notification-confirm {
      background: linear-gradient(135deg, #EC4899, #8B5CF6);
    }
    
    .notification-update .notification-icon {
      background: linear-gradient(135deg, #4F46E5, #3B82F6);
      color: white;
    }
    
    .notification-update .notification-confirm {
      background: linear-gradient(135deg, #4F46E5, #3B82F6);
    }
    
    .notification-icon {
      width: 80px;
      height: 80px;
      border-radius: 50%;
      margin: 0 auto 20px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .notification-icon i {
      font-size: 40px;
    }
    
    .notification-title {
      font-size: 22px;
      font-weight: 700;
      margin-bottom: 12px;
      color: var(--dark);
    }
    
    .notification-message {
      font-size: 15px;
      color: var(--gray);
      margin-bottom: 24px;
      line-height: 1.6;
    }
    
    .notification-actions {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    
    .notification-btn {
      padding: 12px;
      border-radius: 12px;
      font-size: 16px;
      font-weight: 600;
      text-align: center;
      border: none;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .notification-confirm {
      color: white;
    }
    
    .notification-cancel {
      background-color: var(--light);
      color: var(--dark);
    }
    
    .notification-cancel:hover {
      background-color: var(--light-gray);
    }
    
    /* 特殊通知样式 */
    .media-notification .notification-content {
      padding: 0;
      overflow: hidden;
    }
    
    .media-container {
      width: 100%;
      height: 200px;
      background-color: #000;
      position: relative;
    }
    
    .media-container img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    
    .media-overlay {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
      padding: 20px;
      color: white;
      text-align: left;
    }
    
    .media-caption {
      font-size: 14px;
      opacity: 0.9;
    }
    
    .countdown-notification .countdown {
      font-size: 24px;
      font-weight: 700;
      color: var(--danger);
      margin: 10px 0 20px;
    }
    
    .progress-notification .progress-container {
      height: 8px;
      background-color: var(--light-gray);
      border-radius: 4px;
      margin-bottom: 24px;
      overflow: hidden;
    }
    
    .progress-bar {
      height: 100%;
      background-color: var(--primary);
      width: 0%;
      transition: width 0.5s ease;
    }
    
    /* 动画效果 */
    @keyframes pulse {
      0% { transform: scale(1); }
      50% { transform: scale(1.05); }
      100% { transform: scale(1); }
    }
    
    .pulse {
      animation: pulse 2s infinite;
    }
    
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    
    .fade-in {
      animation: fadeIn 0.5s ease forwards;
    }
    
    /* 响应式调整 */
    @media (max-width: 360px) {
      .notification-title {
        font-size: 20px;
      }
      
      .notification-icon {
        width: 70px;
        height: 70px;
      }
      
      .notification-icon i {
        font-size: 36px;
      }
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="app-content">
      <h1 class="page-title">全屏消息提示演示</h1>
      
      <div class="section">
        <h2 class="section-title">系统通知</h2>
        <button class="btn btn-success" onclick="showNotification('success')">成功提示</button>
        <button class="btn btn-warning" onclick="showNotification('warning')">警告提示</button>
        <button class="btn btn-danger" onclick="showNotification('error')">错误提示</button>
        <button class="btn btn-info" onclick="showNotification('info')">信息提示</button>
      </div>
      
      <div class="section">
        <h2 class="section-title">社交互动</h2>
        <button class="btn btn-primary" onclick="showNotification('invite')">好友邀请</button>
        <button class="btn btn-outline" onclick="showNotification('like')">点赞通知</button>
        <button class="btn btn-outline" onclick="showNotification('comment')">评论通知</button>
      </div>
      
      <div class="section">
        <h2 class="section-title">特殊场景</h2>
        <button class="btn btn-primary" onclick="showNotification('media')">媒体内容</button>
        <button class="btn btn-outline" onclick="showNotification('countdown')">倒计时提示</button>
        <button class="btn btn-outline" onclick="showNotification('progress')">进度提示</button>
        <button class="btn btn-outline" onclick="showNotification('update')">版本更新</button>
      </div>
    </div>
  </div>
  
  <!-- 1. 成功提示 -->
  <div class="fullscreen-notification notification-success" id="notification-success">
    <div class="notification-backdrop"></div>
    <div class="notification-content">
      <div class="notification-icon">
        <i class="fa fa-check"></i>
      </div>
      <h3 class="notification-title">操作成功</h3>
      <p class="notification-message">
        您的信息已成功提交，我们将尽快处理并通知您结果。
      </p>
      <div class="notification-actions">
        <button class="notification-btn notification-confirm" onclick="hideNotification('success')">确定</button>
      </div>
    </div>
  </div>
  
  <!-- 2. 警告提示 -->
  <div class="fullscreen-notification notification-warning" id="notification-warning">
    <div class="notification-backdrop"></div>
    <div class="notification-content">
      <div class="notification-icon">
        <i class="fa fa-exclamation-triangle"></i>
      </div>
      <h3 class="notification-title">注意事项</h3>
      <p class="notification-message">
        您的账号已连续3次输入错误密码，再试一次将暂时锁定15分钟。
      </p>
      <div class="notification-actions">
        <button class="notification-btn notification-cancel" onclick="hideNotification('warning')">取消</button>
        <button class="notification-btn notification-confirm" onclick="hideNotification('warning')">继续</button>
      </div>
    </div>
  </div>
  
  <!-- 3. 错误提示 -->
  <div class="fullscreen-notification notification-error" id="notification-error">
    <div class="notification-backdrop"></div>
    <div class="notification-content">
      <div class="notification-icon">
        <i class="fa fa-times"></i>
      </div>
      <h3 class="notification-title">操作失败</h3>
      <p class="notification-message">
        网络连接异常，请检查您的网络设置后重试。
      </p>
      <div class="notification-actions">
        <button class="notification-btn notification-cancel" onclick="hideNotification('error')">稍后重试</button>
        <button class="notification-btn notification-confirm" onclick="hideNotification('error')">检查网络</button>
      </div>
    </div>
  </div>
  
  <!-- 4. 信息提示 -->
  <div class="fullscreen-notification notification-info" id="notification-info">
    <div class="notification-backdrop"></div>
    <div class="notification-content">
      <div class="notification-icon">
        <i class="fa fa-info"></i>
      </div>
      <h3 class="notification-title">新功能上线</h3>
      <p class="notification-message">
        我们新增了"附近的人"功能，现在可以发现身边的好友，快去体验吧！
      </p>
      <div class="notification-actions">
        <button class="notification-btn notification-cancel" onclick="hideNotification('info')">稍后再说</button>
        <button class="notification-btn notification-confirm" onclick="hideNotification('info')">立即体验</button>
      </div>
    </div>
  </div>
  
  <!-- 5. 好友邀请 -->
  <div class="fullscreen-notification notification-invite" id="notification-invite">
    <div class="notification-backdrop"></div>
    <div class="notification-content">
      <div class="notification-icon pulse">
        <i class="fa fa-user-plus"></i>
      </div>
      <h3 class="notification-title">好友邀请</h3>
      <p class="notification-message">
        李明想加你为好友，你们有3个共同好友，是否同意？
      </p>
      <div class="notification-actions">
        <button class="notification-btn notification-cancel" onclick="hideNotification('invite')">拒绝</button>
        <button class="notification-btn notification-confirm" onclick="hideNotification('invite')">同意</button>
      </div>
    </div>
  </div>
  
  <!-- 6. 点赞通知 -->
  <div class="fullscreen-notification notification-info" id="notification-like">
    <div class="notification-backdrop"></div>
    <div class="notification-content">
      <div class="notification-icon">
        <i class="fa fa-heart"></i>
      </div>
      <h3 class="notification-title">收到新点赞</h3>
      <p class="notification-message">
        王小红和其他3位好友赞了你的最新动态。
      </p>
      <div class="notification-actions">
        <button class="notification-btn notification-cancel" onclick="hideNotification('like')">知道了</button>
        <button class="notification-btn notification-confirm" onclick="hideNotification('like')">查看详情</button>
      </div>
    </div>
  </div>
  
  <!-- 7. 评论通知 -->
  <div class="fullscreen-notification notification-info" id="notification-comment">
    <div class="notification-backdrop"></div>
    <div class="notification-content">
      <div class="notification-icon">
        <i class="fa fa-comment"></i>
      </div>
      <h3 class="notification-title">新的评论</h3>
      <p class="notification-message">
        张小明评论了你的照片："这张照片拍得真不错，在哪里拍的呀？"
      </p>
      <div class="notification-actions">
        <button class="notification-btn notification-cancel" onclick="hideNotification('comment')">忽略</button>
        <button class="notification-btn notification-confirm" onclick="hideNotification('comment')">回复评论</button>
      </div>
    </div>
  </div>
  
  <!-- 8. 媒体内容通知 -->
  <div class="fullscreen-notification media-notification" id="notification-media">
    <div class="notification-backdrop"></div>
    <div class="notification-content">
      <div class="media-container">
        <img src="https://picsum.photos/id/65/800/400" alt="分享的图片">
        <div class="media-overlay">
          <div class="media-caption">来自王小明的照片分享</div>
        </div>
      </div>
      <div style="padding: 20px;">
        <h3 class="notification-title">新的照片分享</h3>
        <p class="notification-message">
          王小明分享了3张旅行照片，是否查看？
        </p>
        <div class="notification-actions">
          <button class="notification-btn notification-cancel" onclick="hideNotification('media')">不看了</button>
          <button class="notification-btn notification-confirm" style="background-color: var(--primary); color: white;" onclick="hideNotification('media')">查看照片</button>
        </div>
      </div>
    </div>
  </div>
  
  <!-- 9. 倒计时提示 -->
  <div class="fullscreen-notification countdown-notification notification-warning" id="notification-countdown">
    <div class="notification-backdrop"></div>
    <div class="notification-content">
      <div class="notification-icon">
        <i class="fa fa-clock-o"></i>
      </div>
      <h3 class="notification-title">活动即将结束</h3>
      <p class="notification-message">
        您参与的"夏日抽奖"活动将在：
      </p>
      <div class="countdown" id="countdown-timer">05:00</div>
      <div class="notification-actions">
        <button class="notification-btn notification-cancel" onclick="hideNotification('countdown')">关闭</button>
        <button class="notification-btn notification-confirm" onclick="hideNotification('countdown')">立即参与</button>
      </div>
    </div>
  </div>
  
  <!-- 10. 进度提示 -->
  <div class="fullscreen-notification progress-notification notification-info" id="notification-progress">
    <div class="notification-backdrop"></div>
    <div class="notification-content">
      <div class="notification-icon">
        <i class="fa fa-cloud-upload"></i>
      </div>
      <h3 class="notification-title">正在上传</h3>
      <p class="notification-message">
        照片正在上传中，请稍候...
      </p>
      <div class="progress-container">
        <div class="progress-bar" id="upload-progress"></div>
      </div>
      <div class="notification-actions">
        <button class="notification-btn notification-confirm" onclick="hideNotification('progress')">取消上传</button>
      </div>
    </div>
  </div>
  
  <!-- 11. 版本更新 -->
  <div class="fullscreen-notification notification-update" id="notification-update">
    <div class="notification-backdrop"></div>
    <div class="notification-content">
      <div class="notification-icon">
        <i class="fa fa-refresh"></i>
      </div>
      <h3 class="notification-title">版本更新</h3>
      <p class="notification-message">
        发现新版本 v2.3.0，优化了性能并修复了已知问题，建议立即更新。
      </p>
      <div class="notification-actions">
        <button class="notification-btn notification-cancel" onclick="hideNotification('update')">以后更新</button>
        <button class="notification-btn notification-confirm" onclick="hideNotification('update')">立即更新</button>
      </div>
    </div>
  </div>
  
  <!-- Bootstrap JS -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  
  <script>
    // 显示通知
    function showNotification(type) {
      const notification = document.getElementById(`notification-${type}`);
      if (notification) {
        notification.classList.add('show');
        
        // 特殊处理
        if (type === 'countdown') {
          startCountdown();
        } else if (type === 'progress') {
          startProgress();
        }
      }
    }
    
    // 隐藏通知
    function hideNotification(type) {
      const notification = document.getElementById(`notification-${type}`);
      if (notification) {
        notification.classList.remove('show');
        
        // 清除特殊处理
        if (type === 'countdown') {
          clearInterval(window.countdownInterval);
        } else if (type === 'progress') {
          clearInterval(window.progressInterval);
        }
      }
    }
    
    // 倒计时功能
    function startCountdown() {
      let minutes = 5;
      let seconds = 0;
      const timerElement = document.getElementById('countdown-timer');
      
      clearInterval(window.countdownInterval);
      
      window.countdownInterval = setInterval(() => {
        if (seconds === 0) {
          if (minutes === 0) {
            clearInterval(window.countdownInterval);
            hideNotification('countdown');
            return;
          }
          minutes--;
          seconds = 59;
        } else {
          seconds--;
        }
        
        timerElement.textContent = `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
      }, 1000);
    }
    
    // 进度条功能
    function startProgress() {
      let progress = 0;
      const progressBar = document.getElementById('upload-progress');
      
      clearInterval(window.progressInterval);
      
      window.progressInterval = setInterval(() => {
        progress += Math.random() * 5;
        if (progress >= 100) {
          progress = 100;
          clearInterval(window.progressInterval);
          
          // 模拟上传完成
          setTimeout(() => {
            hideNotification('progress');
            setTimeout(() => showNotification('success'), 300);
          }, 500);
        }
        
        progressBar.style.width = `${progress}%`;
      }, 300);
    }
    
    // 点击背景关闭通知
    document.querySelectorAll('.notification-backdrop').forEach(backdrop => {
      backdrop.addEventListener('click', function() {
        const notification = this.closest('.fullscreen-notification');
        if (notification) {
          const type = notification.id.split('-')[1];
          hideNotification(type);
        }
      });
    });
  </script>
</body>
</html>
